package com.cysoft.domain;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 压铸机台
 */
public class Machine extends Step {
    /**
     * 铸造台
     */
    private String type;

    /**
     * 过滤网类型
     */
    private List<FilterType> filterTypeList;
    /**
     * 铸造工艺
     */
    private List<WheelTechType> wheelTechTypeList;

    /**
     * A01,B13,C25
     */
    private String name;

    /**
     * 最小尺寸
     */
    private int minSize;
    /**
     * 最大尺寸
     */
    private int maxSize;

    public Machine() {
    }

    public Machine(long id, String type) {
        super(id);
        this.type = type;
    }

    public Machine(long id, String type, String name, int minSize, int maxSize) {
        super(id);
        this.type = type;
        this.name = name;
        this.minSize = minSize;
        this.maxSize = maxSize;
    }

    public Machine copyFrom(Machine machine) {
        this.id = machine.getId();
        this.type = machine.getType();
        this.name = machine.getName();
        this.minSize = machine.getMinSize();
        this.maxSize = machine.getMaxSize();
        this.wheelTechTypeList.clear();
        this.wheelTechTypeList.addAll(machine.getWheelTechTypeList());
        this.filterTypeList.clear();
        this.filterTypeList.addAll(machine.getFilterTypeList());

        return this;
    }


    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public List<FilterType> getFilterTypeList() {
        return filterTypeList;
    }

    public void setFilterTypeList(List<FilterType> filterTypeList) {
        this.filterTypeList = filterTypeList;
    }

    public List<WheelTechType> getWheelTechTypeList() {
        return wheelTechTypeList;
    }

    public void setWheelTechTypeList(List<WheelTechType> wheelTechTypeList) {
        this.wheelTechTypeList = wheelTechTypeList;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getMinSize() {
        return minSize;
    }

    public void setMinSize(int minSize) {
        this.minSize = minSize;
    }

    public int getMaxSize() {
        return maxSize;
    }

    public void setMaxSize(int maxSize) {
        this.maxSize = maxSize;
    }

    @Override
    public LocalDateTime getEndDateTime() {
        return Constant.BEGIN_DATE;
    }

    @Override
    public Machine getMachine() {
        return this;
    }

    @Override
    public Mold getMold() {
        return null;
    }

    @Override
    public int getEndTimeDigtal() {
        return 0;
    }
}